// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__E1550D5B_32B9_426A_A931_E005017DE515__INCLUDED_)
#define AFX_STDAFX_H__E1550D5B_32B9_426A_A931_E005017DE515__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxcview.h>
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include "sacode.h"

extern std::vector<SYCity> vecCitys;
extern std::vector<SYCityDistance> vecCityDistances;
extern int CityNumber;
extern double InitialTemperature;
extern double NowTemperature;
extern int	NowExternalIterNumber;
extern int NowInnerIterNumber;
extern int FileType;

void InitialSA();
void ClearSA();
void CreateCityRouter( CityRouterDef &CityRouter );
void CreateCityRouter2opt( CityRouterDef &preCityRouter, CityRouterDef &CityRouter );
double CountTotalDistance( CityRouterDef &CityRouter );
double CountCityDistance( SYCity &FromCity, SYCity &ToCity, SYCityDistance &CityDistance );
double FindCityDistance( int FromCityIndex, int ToCityIndex );
double CountInitialTemperatureMaxMin( double maxdis, double mindis, int rate );
double CountDownTemperature( double nowtemp, int DownMode );
BOOL JudgeOverInnerLoop( int JudgeMode );
BOOL JudgeOverExternalLoop( int JudgeMode );
CString FormRouterString( SYRouter &CityRouter );
UINT SACompution(LPVOID pParam);
void GetRouterFileString( SYRouter &CityRouter, CString &strTemp );

#define WYWM_INFOVIEWAPPENDINFO		(WM_USER + 1000)

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__E1550D5B_32B9_426A_A931_E005017DE515__INCLUDED_)
